

package cn.shengchao.examstar.distribute.acl.adapters.repositories;

import cn.shengchao.examstar.distribute.acl.ports.repositories.IDistributeRepository;
import cn.shengchao.examstar.distribute.infrastrure.mapper.DistributeNodeInfoMapper;
import cn.shengchao.examstar.rpc.distribute.req.DistributorQueryPage;
import cn.shengchao.examstar.rpc.distribute.req.DistributorStudentQueryPage;
import cn.shengchao.examstar.rpc.distribute.resp.DistributorRespEntity;
import cn.shengchao.examstar.rpc.distribute.resp.DistributorStudentEntity;
import cn.shengchao.examstar.rpc.member.req.MemberQueryPage;
import cn.shengchao.examstar.rpc.member.res.MemberList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class DistributeRepository implements IDistributeRepository {

    @Autowired
    private DistributeNodeInfoMapper distributeNodeInfoMapper;

    @Override
    public List<DistributorRespEntity> queryDistributorPageResult(DistributorQueryPage pageQuery) {
        return distributeNodeInfoMapper.queryDistributorPageResult(pageQuery);
    }

    @Override
    public List<DistributorStudentEntity> queryDistributorStudentPageResult(DistributorStudentQueryPage pageQuery, List<Long> userIds) {
        return distributeNodeInfoMapper.queryDistributorStudentPageResult(pageQuery,userIds);
    }

    @Override
    public List<MemberList> getMemberList(MemberQueryPage memberQueryPage) {
        return distributeNodeInfoMapper.getMemberList(memberQueryPage);
    }
}
